/*
    @2018-01-30
*/
var Common = new Object();

Common.GET_INDUSTRY_URL = 'https://goldeye.cfbond.com/cmsys/industry_info?session_id=${localStorage.sys_sessionId}';
Common.GET_QUERY_URL = 'https://goldeye.cfbond.com/cmsys/cms_info/?api_type=';
//数据查询侧栏导航
Common.DataQueryNav = [
		{name:'综合得分',link:'complex.html',iClass:'el-icon-menu'},
    {name:'合规模块',link:'compliance.html',iClass:'el-icon-tickets'},
    {name:'经营得分',link:'manage.html',iClass:'el-icon-mobile-phone'},
    {name:'市场模块',link:'market.html',iClass:'el-icon-goods'},
    {name:'舆情模块',link:'opinion.html',iClass:'el-icon-document'}
];
Common.quit = function(){
	localStorage.clear();
	window.location.href = '../login.html'
};
Common.downExcel = function(_url){
	alert('暂不支持该功能');
};
Common.getYesterDay = function(){
	var yDate = new Date(new Date()-24*60*60*1000);
	var oYear = yDate.getFullYear();
	var oMonth = (yDate.getMonth()+1).toString().length==2?(yDate.getMonth()+1).toString():'0'+(yDate.getMonth()+1).toString();
	var oDate = yDate.getDate().toString().length==2?yDate.getDate().toString():'0'+yDate.getDate().toString();
	return oYear+'-'+oMonth+'-'+oDate;
};
Common.default_sTime = Common.getYesterDay()+' 00:00:00';
Common.default_eTime = Common.getYesterDay()+' 24:00:00';

(function(){
	if(!localStorage.sys_userId){//没有登陆信息
		window.location.href='../login.html'
	}
})();

function GetQueryString(name){//获取参数
    var reg = new RegExp("(^|&)"+name+"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null) return unescape(r[2]);
    return null;
}

Common.newWin = function(url, id) {  
              var a = document.createElement('a');  
              a.setAttribute('href', url);  
              a.setAttribute('target', '_blank');  
              a.setAttribute('id', id);  
              // 防止反复添加  
              if(!document.getElementById(id)) {                       
                  document.body.appendChild(a);  
              }  
              a.click();  
              a.remove();
  }  



